﻿<UserControl x:Class="Photos.Controls.StackControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Controls="clr-namespace:Photos.Controls" Margin="30" MouseWheel="UserControlMouseWheel">
    <UserControl.Resources>
        <Storyboard x:Key="FadeInAnim">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.3"/>
        </Storyboard>
        <Storyboard x:Key="FadeOutAnim" Completed="FadeOutCompleted">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.2"/>
        </Storyboard>
        <Storyboard x:Key="BottomPhotoAnimForward">
            <DoubleAnimation Storyboard.TargetProperty="(RenderTransform).Angle" From="10" To="0" Duration="0:0:0.3"/>
        </Storyboard>
        <Storyboard x:Key="TopPhotoAnimForward" Completed="StoryboardCompleted" CurrentStateInvalidated="StoryboardCurrentStateInvalidated">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.2"/>
            <ThicknessAnimation Storyboard.TargetProperty="Margin" To="0,-50,0,0" Duration="0:0:0.2"/>
        </Storyboard>
        <!-- this is for new top photo -->
        <Storyboard x:Key="TopPhotoAnimBackward" CurrentStateInvalidated="StoryboardCurrentStateInvalidated">
            <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.2"/>
            <ThicknessAnimation Storyboard.TargetProperty="Margin" From="0,-50,0,0"  To="0" Duration="0:0:0.2"/>
        </Storyboard>
        <!-- this is for the photo which was on top -->
        <Storyboard x:Key="BottomPhotoAnimBackward">
            <DoubleAnimation Storyboard.TargetProperty="(RenderTransform).Angle" From="0" To="10" Duration="0:0:0.3"/>
        </Storyboard>
    </UserControl.Resources>
    <Canvas Name="Root">
        <!--<Controls:PhotoControl Rotate="10" Source="{x:Null}" Width="300" Height="300"/>-->
        <!--<Controls:PhotoControl Rotate="10" Source="/Photos;component/Resources/preview_landscape.png" Width="300" Canvas.Top="50"/>
        <Controls:PhotoControl Height="300" Canvas.Left="50"/>-->
    </Canvas>

</UserControl>
